<- lm(UNINSURED ~ TREAT * POST, data = df)
uninsured_dd summary(uninsured_dd)
Data Lab 11 - Medicaid and Health Pt.2
Welcome to the last Data Lab of the semester! Today, we’ll continue our analysis of the relationship between Medicaid coverage in health. So far, we’ve seen that Medicaid coverage appears to be associated with worse health. This was true when we compared means across those with and without Medicaid coverage and even when we regressed self-reported health on Medicaid controlling for some potential confounders.
However, as we know, it’s difficult (if not impossible) to control for ALL confounders in a standard regression analysis and so there may still be selection bias that could be contaminating our estimate of the average treatment effect of Medicaid on health. So today, we’re going to use a quasi-experimental research design called “difference-in-differences” (DD) that should help us better control for this selection bias.
The three things that we’re going to do today are:
- Estimate the effect of Louisiana’s Medicaid expansion on insurance coverage.
- Estimate the effect of Louisiana’s Medicaid expansion on health care access.
- Estimate the effect of Louisiana’s Medicaid expansion on health outcomes.
Step 1: Create a New R Markdown Document for this Data Lab
Create a new R Markdown document and give it a YAML header that includes the title “HPAM 7660 Data Lab 11”, your name, the date, and “pdf_document” as the output format. You’ll submit a pdf of this R Markdown document once you’ve finished the Data Lab today.
Step 2: Load and Prepare the Data
I’ve created a data file for us to use in this Data Lab. The data file is called brfss_datalab11.rds
and you can download it here.
This data comes from the Behavioral Risk Factor Surveillance Survey (BRFSS). We’ve used this data in previous Data Labs, though in this version, I’ve already restricted the data to low-income respondents between the ages of 26 and 64. Here are the variables included in the acs_datalab11.rds
file and their values:
- YEAR: survey year; 2012 through 2019.
- STATEFIP: state FIPS code (already restricted to Louisiana and southern non-expansion states).
- GENHLTH: self-rated health; 1 = excellent, 2 = very good, 3 = good, 4 = fair, 5 = poor.
- PHYSHLTH: Number of days in the past month that a respondent’s physical health was ‘not good’.
- MENTHLTH: Number of days in the past month that a respondent’s mental health was ‘not good’.
- UNINSURED: does the respondent lack health insurance coverage; 1 = yes, 2 = no.
- PERSDOC2: does the respondent have a usual source of care; 1 = yes, 0 = no.
- MEDCOST: did the respondent forgo medical care in past year due to cost; 1 = yes, 0 = no.
Using this file, generate the following variables that we’ll need for the DD analyses:
- TREAT: a variable that is equal to 1 if a respondent lives in Louisiana and is equal to 0 if they live in another southern non-expansion state.
- POST: a variable that is equal to 1 if the survey year is 2016 through 2019 and is equal to 0 if the survey year is prior to 2016.
Also, let’s tweak a few of the self-rated health measures to make them easier to interpret for our analyses. Generate the following outcome variables using the existing BRFSS measures of self-rated health:
- FP_HEALTH: a variable that equals 1 if the respondent reported their health as ‘Fair’ or ‘Poor’ (i.e., GENHLTH = 4 or 5) and equals 0 if the respondent reported their health as ‘Excellent’, ‘Very Good’, or ‘Good’ (i.e., GENHLTH = 1, 2, or 3).
- ANY_MENTHLTH: a variable that equals 1 if the respondent reported between 1 and 30 days in the past month that their mental health was ‘not good’ and equals 0 if they reported 0 days in the past month that their mental health was ‘not good’.
- ANY_PHYSHLTH: a variable that equals 1 if the respondent reported between 1 and 30 days in the past month that their physical health was ‘not good’ and equals 0 if they reported 0 days in the past month that their physical health was ‘not good’.
Step 3: Use a Difference-in-Differences Model to Estimate the Effect of Louisiana’s Medicaid Expansion on the Uninsured Rate
Remember that in a DD framework, we’re calculating: [(Treat_post - Treat_pre) - (Control_post - Control_pre)]. Typically, we do this in a regression framework because it allows us to add additional control variables if we’d like (we won’t do that today) and it makes it easy to calculate p-values and confidence intervals. The regression equivalent of the DD calculation above is ’Outcome = Treat + Post + Treat*Post’. Let’s run this regression and see what we get. You can use the following code replacing ‘df’ with whatever you name you used for your data set:
The coefficient estimate on the interaction term TREAT*POST
is our DD estimate of the effect of Louisiana’s Medicaid expansion on the share of our sample that is uninsured. If you multiply this coefficient by 100, you’ll get the percentage point change in the uninsured rate resulting from Medicaid expansion in Louisiana.
This percentage point change is the absolute effect of the policy, but it’s also helpful to provide the relative effect (i.e, the percentage change from baseline). To convert the absolute effect to the relative effect, we need to know what share of Louisianans lacked insurance coverage in the pre-policy period. We can get that value using the following code:
%>%
df filter(STATEFIP == 22, POST == 0) %>%
summarize(MEAN_UNINSURED = mean(UNINSURED, na.rm=TRUE))
Here we’re using the summarize
command to calculate the mean value of UNINSURED
for Louisiana (STATEFIP == 22) in the pre-policy period (POST ==0).
To calculate the relative effect, we can divide the absolute effect by the baseline mean and multiply by 100. In this case, you should get the following: (-0.132/0.362)*100 = -36.5.
In other words, Louisiana’s Medicaid expansion reduced the uninsurance rate among low-income people between the ages of 20 and 64 by 13.2 percentage points, which is a 36.5 percent reduction from the baseline mean.
Step 4: Use a Difference-in-Differences Model to Estimate the Effect of Louisiana’s Medicaid Expansion on Access to Care
Next, let’s look at whether Louisiana’s Medicaid expansion had an effect on whether a respondent reports a usual source of care and whether the respondent went without medical care in past year due to cost.
- Estimate DD models using PERSDOC2 and MEDCOST as outcome variables.
- Report both the absolute and relative effects of Louisiana’s Medicaid expansion on these outcomes.
Step 4: Use a Difference-in-Differences Model to Estimate the Effect of Louisiana’s Medicaid Expansion on Self-Rated Health
Finally, let’s see how Louisiana’s Medicaid expansion might’ve affected the self-rated health of the state’s low-income, adult non-elderly population.
- Estimate DD models using FP_HEALTH, ANY_MENTHLTH, and ANY_PHYSHLTH as outcome variables.
- Report both the absolute and relative effects of Louisiana’s Medicaid expansion on these outcomes.
- How do your results here differ from your previous estimates of the relationship between Medicaid coverage and health? What might explain these differences?
Step 6: Knitting to PDF
Once you’ve finished answering the questions, knit your R Markdown document to a PDF and upload the PDF here. Your document should include all of the tables and figures you created in this Data Lab along with your answers to the questions.